import { createRouter, createWebHistory } from "vue-router";
import layout from '@/views/layout/index.vue'
import login from '@/views/login/index.vue'
import home from '@/views/home/index.vue'
import category from '@/views/category/index.vue'

const routes = [
    { path: "/", name: 'layout', component: layout, children: [
        { path: "", name: 'home', component: home },
        { path: "/category", name: 'category', component: category },
    ]},
    { path: "/login", name: 'login', component: login }
]

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes
})

export default router